/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Excepciones;

/**
 *
 * @author Luis_Angel
 */
public class TestException {

    public static void main(String[] args){
        //test();//sin captura...imprime finally y luego se corta por la Excepcion.
        try{
            test();
        }
        catch(Exception e){System.out.println("exception");}
    }

    private static void test(){
        //si es posible agregar un bloqye try...finalyy
        Integer i = new Integer(4) + new Integer(5);
        System.out.println(""+i);
        try{
            String s = null;
            System.out.println(s.toString());
          //  throw new Exception();
        }
        finally{
            System.out.println("finally");
        }
    }
}
